package org.apache.struts2.plugin.json;

import org.apache.struts2.plugin.json.model.JSONString;
import org.apache.struts2.plugin.json.model.JSONValue;

/**
 *
 * @author VERDOÏA Laurent <verdoialaurent@gmail.com>
 */
public enum DataBank {

    STRING_ONE(new JSONString("one"), "\"one\""),
    STRING_TWO(new JSONString("two"), "\"two\""),
    STRING_THREE(new JSONString("three"), "\"three\""),
    STRING_FOUR(new JSONString("four"), "\"four\""),
    STRING_KANJI(new JSONString("漢字は大丈夫ですか。"), "\"漢字は大丈夫ですか。\""),
    STRING_QUOTESLASH(new JSONString("\"/"), "\"\\\"\\/\""),
    STRING_ALPHABET(new JSONString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
    "\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\""),
    STRING_CONTROL(new JSONString("\"/\b\f\n\r\t"), "\"\\\"\\/\\b\\f\\n\\r\\t\""),
    STRING_OTHER(new JSONString("!#$%&'()=-~^|_"), "\"!#$%&'()=-~^|_\"");
    private JSONValue json;
    private String serialized;

    private DataBank(JSONValue json, String serialized) {
        this.json = json;
        this.serialized = serialized;
    }

    public JSONValue getJson() {
        return json;
    }

    public String getSerialized() {
        return serialized;
    }
}
